package com.corgi.multi.anno.config.dynamic;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * DynamicDataSource
 * 动态数据源<br/>每执行一次数据库，动态获取DataSource
 * @title: DynamicDataSource
 * @description:
 * @author: dengmiao
 * @create: 2020-05-22 13:05
 **/
public class DynamicDataSource extends AbstractRoutingDataSource {
    @Override
    protected Object determineCurrentLookupKey() {
        return DynamicDataSourceContextHolder.getDataSourceType();
    }
}
